# -*- coding: UTF-8 -*-


import book_on_sale

book_demand_list = book_on_sale.get_book_xxx_list(r'./data/book-demand.data')
sale_book_list = book_on_sale.get_sale_book_list()

no_book_wanted = True
for sale_book in sale_book_list:
    for target_book in book_demand_list:
        if target_book in sale_book.name:
            print target_book.decode("utf-8").encode("GBK"), '  ', \
                sale_book.name.decode("utf-8").encode("GBK"), '  ', \
                sale_book.sale_price, '  ', sale_book.min_price
            print '\n\n'
            no_book_wanted = False

if no_book_wanted:
    print 'no book wanted!'

raw_input('press "Enter" to continue...')
